using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace OutpatientApi.DTO
{
    /// <summary>
    /// 药品信息显示字段Dto
    /// </summary>
    public class MedicineDto
    {
        /// <summary>
        /// 药品唯一标识,主键,自增
        /// </summary>
        public int MedicineId { get; set; }

        /// <summary>
        /// 关联住院登记表的外键,标识药品所属的住院登记
        /// </summary>
        public int AdmissionId { get; set; }

        /// <summary>
        /// 药品名称
        /// </summary>
        public string MedicineName { get; set; } = string.Empty;

        /// <summary>
        /// 药品类型(如:西药、中药等)
        /// </summary>
        public string DrugType { get; set; } = string.Empty;

        /// <summary>
        /// 药品费用名称(如:西药费、中药费等)
        /// </summary>
        public string FeeName { get; set; } = string.Empty;

        /// <summary>
        /// 剂型(如:片剂、颗粒等)
        /// </summary>
        public string DosageForm { get; set; } = string.Empty;

        /// <summary>
        /// 规格
        /// </summary>
        public string Specification { get; set; } = string.Empty;

        /// <summary>
        /// 进价(单位:元)
        /// </summary>
        public decimal? PurchasePrice { get; set; }

        /// <summary>
        /// 售价(单位:元)
        /// </summary>
        public decimal SellingPrice { get; set; }

        /// <summary>
        /// 库存数量
        /// </summary>
        public int StockQuantity { get; set; }

        /// <summary>
        /// 库存上限
        /// </summary>
        public int? StockUpperLimit { get; set; }

        /// <summary>
        /// 库存下限
        /// </summary>
        public int? StockLowerLimit { get; set; }

        /// <summary>
        /// 生产日期
        /// </summary>
        public DateTime ProductionDate { get; set; }

        /// <summary>
        /// 有效日期
        /// </summary>
        public DateTime ExpirationDate { get; set; }

        /// <summary>
        /// 病功效
        /// </summary>
        public string Efficacy { get; set; } = string.Empty;
    }

    /// <summary>
    /// 药品查询条件
    /// </summary>
    public class GetMedicineDto
    {
        /// <summary>
        /// 药品名称（可选）
        /// </summary>
        public string? MedicineName { get; set; }

        /// <summary>
        /// 药品类型（可选）
        /// </summary>
        public string? DrugType { get; set; }

        /// <summary>
        /// 住院登记ID（可选）
        /// </summary>
        public int? AdmissionId { get; set; }
    }

    /// <summary>
    /// 药品查找查询条件
    /// </summary>
    public class SearchMedicineDto
    {
        /// <summary>
        /// 药品名称（可选）
        /// </summary>
        public string? MedicineName { get; set; }

        /// <summary>
        /// 药品价格（可选）
        /// </summary>
        public decimal? MedicinePrice { get; set; }

        /// <summary>
        /// 剂型（可选）
        /// </summary>
        public string? DosageForm { get; set; }

        /// <summary>
        /// 进价（可选）
        /// </summary>
        public decimal? PurchasePrice { get; set; }

        /// <summary>
        /// 售价（可选）
        /// </summary>
        public decimal? SellingPrice { get; set; }
    }
} 